package com.gcit.seniorWish.web.modular.enroll.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.gcit.seniorWish.web.common.constant.cache.Cache;
import com.gcit.seniorWish.web.common.constant.cache.CacheKey;
import com.gcit.seniorWish.web.common.persistence.model.EnrollSchoolBatchMajor;
import com.baomidou.mybatisplus.service.IService;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 报考专业表 服务类
 * </p>
 *
 * @author gaozhichang
 * @since 2018-03-19
 */
public interface IEnrollSchoolBatchMajorService extends IService<EnrollSchoolBatchMajor> {

	@Transactional
	void insertEnrollMajor(EnrollSchoolBatchMajor enrollMajor);

	void updateEnrollMajor(EnrollSchoolBatchMajor enrollMajor);

	List listEnrollMajorForSelect2(Page<Map<String, Object>> page, String enrollSchoolId, String majorName, String majorId);

	@Transactional
	@CacheEvict(value = Cache.BUSS, key = "'" + CacheKey.ENROLL_MAJOR + "'+#majorId")
	void deleteMajor(String majorId);

    List listEnrollMajorForSelect22(Page<Map<String ,Object>> page, String enrollSchoolId, int batchNum);
}
